<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="js/jquery-1.7.2.min.js"></script>
<script src="js/jquery.MultiFile.pack.js"></script>
<script type="text/javascript">

 function Click_submit(){
	// $("#q_form").submit();n
	 
	$.ajax({ 
		type : 'post',
		url : 'FileUpload',
		contentType:"multipart/form-data",
		data : $('#q_form').serialize(),
		dataType : 'text',
		success : function(queryResult) {
			$('#message').html(queryResult);
		},error : function() {
			$('#message').html('使用AJax失敗');
		}
	});
	
} 


</script>

</head>
<body>
	<form id="q_form" method="post" enctype="multipart/form-data" action="FileUpload" >
	<input type="text" id="itext" name="ntext" />
	<input type="file" id="ifile" name="nfile" class="multi" />
	</form>
	<button type="button" onclick="Click_submit()">送出</button>
	<div id="message"></div>
</body>
</html>